package com.ruoyi.api.applycopy.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.api.applycopy.mapper.ApplycopyMapper;
import com.ruoyi.api.applycopy.domain.Applycopy;
import com.ruoyi.api.applycopy.service.IApplycopyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 抄送Service业务层处理
 *
 * @author xzshan
 * @date 2020-06-15
 */
@Service
public class ApplycopyServiceImpl implements IApplycopyService {
  @Autowired
  private ApplycopyMapper applycopyMapper;

  /**
   * 查询抄送
   *
   * @param id 抄送ID
   * @return 抄送
   */
  @Override
  public Applycopy selectApplycopyById(Long id) {
    return applycopyMapper.selectApplycopyById(id);
  }

  /**
   * 查询抄送列表
   *
   * @param applycopy 抄送
   * @return 抄送
   */
  @Override
  public List<Applycopy> selectApplycopyList(Applycopy applycopy) {
    return applycopyMapper.selectApplycopyList(applycopy);
  }

  /**
   * 新增抄送
   *
   * @param applycopy 抄送
   * @return 结果
   */
  @Override
  public int insertApplycopy(Applycopy applycopy) {
    return applycopyMapper.insertApplycopy(applycopy);
  }

  /**
   * 修改抄送
   *
   * @param applycopy 抄送
   * @return 结果
   */
  @Override
  public int updateApplycopy(Applycopy applycopy) {
    return applycopyMapper.updateApplycopy(applycopy);
  }

  /**
   * 删除抄送对象
   *
   * @param ids 需要删除的数据ID
   * @return 结果
   */
  @Override
  public int deleteApplycopyByIds(String ids) {
    return applycopyMapper.deleteApplycopyByIds(Convert.toStrArray(ids));
  }

  /**
   * 删除抄送信息
   *
   * @param id 抄送ID
   * @return 结果
   */
  @Override
  public int deleteApplycopyById(Long id) {
    return applycopyMapper.deleteApplycopyById(id);
  }
}
